/*
 * Copyright 2011 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package fr.gaellalire.jzip.macosx.cocoa;

/*
 * Copyright (c) 2002-2009 David Kocher. All rights reserved.
 *
 * http://cyberduck.ch/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * Bug fixes, suggestions and comments should be sent to:
 * dkocher@cyberduck.ch
 */

import org.rococoa.ID;
import org.rococoa.ObjCClass;
import org.rococoa.Rococoa;
import org.rococoa.cocoa.foundation.NSObject;
import org.rococoa.cocoa.foundation.NSUInteger;

/**
 * @version $Id: NSApplication.java 8215 2011-01-09 23:12:43Z dkocher $
 */
public abstract class NSApplication extends NSObject {
    private static final _Class CLASS = Rococoa.createClass("NSApplication", _Class.class); //$NON-NLS-1$

    public static final NSUInteger NSTerminateCancel = new NSUInteger(0);
    public static final NSUInteger NSTerminateNow = new NSUInteger(1);
    public static final NSUInteger NSTerminateLater = new NSUInteger(2);

    public interface _Class extends ObjCClass {
        /**
         * This method also makes a connection to the window server and completes other initialization.
         * Your program should invoke this method as one of the first statements in main();
         *
         * @return
         */
        public NSApplication sharedApplication();
    }

    public static NSApplication sharedApplication() {
        return CLASS.sharedApplication();
    }

//    public abstract NSEvent currentEvent();

    /**
     * Original signature : <code>void setDelegate(id)</code><br>
     * <i>native declaration : :108</i>
     */
    public abstract void setDelegate(org.rococoa.ID anObject);

    /**
     * Original signature : <code>id delegate()</code><br>
     * <i>native declaration : :109</i>
     */
    public abstract org.rococoa.ID delegate();

    /**
     * Original signature : <code>NSGraphicsContext* context()</code><br>
     * <i>native declaration : :110</i>
     */
    public abstract com.sun.jna.Pointer context();

    /**
     * Original signature : <code>void hide(id)</code><br>
     * <i>native declaration : :111</i>
     */
    public abstract void hide(ID sender);

    /**
     * Original signature : <code>void unhide(id)</code><br>
     * <i>native declaration : :112</i>
     */
    public abstract void unhide(ID sender);

    /**
     * Original signature : <code>void unhideWithoutActivation()</code><br>
     * <i>native declaration : :113</i>
     */
    public abstract void unhideWithoutActivation();


    /**
     * Original signature : <code>void setServicesProvider(id)</code><br>
     * <i>from NSServicesHandling native declaration : :286</i>
     */
    public abstract void setServicesProvider(final ID provider);

    /**
     * Original signature : <code>id servicesProvider()</code><br>
     * <i>from NSServicesHandling native declaration : :287</i>
     */
    public abstract NSObject servicesProvider();
}
